﻿using Kooboo.CMS.Account.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kooboo.Extensions.DeleteContentPermission
{
    public class RegisterContentDeletePermission : Kooboo.CMS.Common.Runtime.IStartupTask
    {
        public void Execute()
        {
            Kooboo.CMS.Account.Services.ServiceFactory.RoleManager.AddPermission(CustomerPermissions.ContentDelete);
        }

        public int Order
        {
            get { return 0; }
        }
    }

    public class CustomerPermissions
    {
        public static Permission ContentDelete
        {
            get
            {
                return new Kooboo.CMS.Account.Models.Permission
                {
                    AreaName = "Contents",
                    Name = "ContentDelete",
                    Group = "",
                };
            }
        }
    }
}
